package org.example.rowing.mapper;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.example.rowing.domain.Team;
import org.example.rowing.vo.TeamVO;

import java.util.List;

@Mapper
public interface TeamMapper {
    @Select("select * from team where id = #{id}")
    Team selectTeamById(Long id);
    List<Team> selectAllTeams();

    List<Team> selectTeamByConditions(Team team);

    Boolean insertTeam(Team team);

    Boolean updateTeam(Team team);

    Boolean deleteTeam(Long id);

    Boolean deleteTeamsByEventId(Long id);

    Boolean insertTeams(List<Team> teamList);

    List<TeamVO> selectTeamVOByBoatType(String boatType);
    List<TeamVO> selectTeamVOByEventId(Long id);
    List<TeamVO> selectTeamVOByEventName(String eventName);
}
